import requests

def login(username, password):
    login_url = 'http://svip.iocoder.cn/user/login'
    session = requests.Session()
    data = {
        'username': username,
        'password': password,
    }
    response = session.post(login_url, data=data)
    if response.status_code == 200:
        print('Login successful!')
        return session
    else:
        print('Login failed!')
        return None

def get_page_content(session):
    url="http://svip.iocoder.cn/index/index.html"
    response = session.get(url)
    if response.status_code == 200:
        return response.text
    else:
        print('Failed to get page content!')
        return None

def main():
    username = 'yudao'
    password = 'jiankan'
    session = login(username, password)
    if session:
        html = get_page_content(session)
        print(html)

if __name__ == "__main__":
    main()
